<mat-card>
  <form #loginForm="ngForm" (ngSubmit)="login(loginForm.value)">
    <mat-card-header>
      <mat-card-title><h2>Login</h2></mat-card-title>
    </mat-card-header>
    <mat-card-content>
      <mat-form-field>
        <input matInput placeholder="Username" [(ngModel)]="loginData.username" required name="username" #username/>
      </mat-form-field>
      <mat-form-field>
        <input type="password" matInput placeholder="Password" [(ngModel)]="loginData.password" required name="password" #password/>
      </mat-form-field>
    </mat-card-content>
    <mat-card-actions>
      <button mat-raised-button color="primary" type="submit"
              [disabled]="!loginForm.form.valid">Login</button>
    </mat-card-actions>
    <mat-card-footer>
    </mat-card-footer>
  </form>
</mat-card>
